﻿using HRSolutionSystem.Application.Contracts.Persistence;
using HRSolutionSystem.Domain;
using HRSolutionSystem.Persistence.DatabaseContext;
using Microsoft.EntityFrameworkCore;
using Microsoft.VisualBasic;

namespace HRSolutionSystem.Persistence.Repositories
{
    public class LeaveRequestRepository : GenericRepository<LeaveRequest>, ILeaveRequestRepository
    {
        public LeaveRequestRepository(HRDatabaseContext context) : base(context)
        {
        }

        public async Task<List<LeaveRequest>> GetLeaveRequestsWithDetails()
        {
            var leaveRequests = await _context.LeaveRequests
                .Include(q=>q.LeaveType)
                .ToListAsync();
            return leaveRequests;
        }

        public Task<List<LeaveRequest>> GetLeaveRequestsWithDetails(string userId)
        {
            throw new NotImplementedException();
        }

        public Task<LeaveRequest> GetLeaveRequestWithDetails(int id)
        {
            throw new NotImplementedException();
        }
    }
}
